<template>
  <div class="news-list">
    <h-news-item :item="item" v-for="(item, index) in list" :key="index" v-if="type == 'h'"></h-news-item>
    <n-news-item :item="item" v-for="(item, index) in list" :key="index" v-if="type == 'n'"></n-news-item>
  </div>
</template>

<script>
  import hNewsItem from './h-news-item.vue'
  import nNewsItem from './n-news-item.vue'

  export default {
    name: 'news-list',
    props: {
      type: {
        type: String,
      },
      list: {
        type: Array
      }
    },
    components: {
      hNewsItem,
      nNewsItem
    },
    data() {
      return {

      }
    }
  }
</script>

<style lang="less">
  @import '~COMMON/common.less';

  .news-list {
  }
</style>